package bcit.nxt.mission;

// ArcDemo.java
// leftArc, rightArc, backward


import gin.and.tonic.*;

public class ArcDemo
{
  public ArcDemo()
  {
    NxtRobot robot = new NxtRobot(true);
    
    int factor=48;
    Gear gear = new Gear(MotorPort.B,MotorPort.C);
    Motor arm= new Motor(MotorPort.A);
    robot.addPart(gear);
    robot.addPart(arm);
    gear.setSpeed(50);
    arm.setSpeed(50);

    gear.forward(45*factor);
    gear.backward(16*factor);
    arm.rotateTo(25,true);
    gear.forward(5*factor);
    gear.backward(34*factor);
    arm.rotateTo(-25,true);
    //gear.leftArc(0.5, 3000);
    //gear.rightArc(0.5, 3000);
    //gear.rightArc(-0.5, 3000);  // backward
    //gear.leftArc(-0.5, 3000);
    //gear.backward(duration);

    robot.exit();
  }

  public static void main(String[] args)
  {
    new ArcDemo();
  }
}
